<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org">
<html>
  <head>
    <base href="<%=basePath%>">
	  <meta charset="UTF-8">
    <title>添加员工</title>
<head>
    <base href="<%=basePath%>">
	<link href="../../../../static/easyui/themes/insdep/easyui.css" rel="stylesheet" type="text/css">
	<link href="../../../../static/easyui/themes/insdep/easyui_animation.css" rel="stylesheet" type="text/css">
	<link href="../../../../static/easyui/themes/insdep/easyui_plus.css" rel="stylesheet" type="text/css">
	<link href="../../../../static/easyui/themes/insdep/insdep_theme_default.css" rel="stylesheet" type="text/css">
	<link href="../../../../static/easyui/themes/insdep/icon.css" rel="stylesheet" type="text/css">
	<link href="../../../../static/easyui/themes/color.css" rel="stylesheet" type="text/css">

	<link href="../../../../static/ztree/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" >
	<link href="../../../../static/css/common.css" rel="stylesheet" type="text/css" >

	<script type="text/javascript" src="../../../../static/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="../../../../static/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../../../static/easyui/themes/insdep/jquery.insdep-extend.min.js"></script>
	<script type="text/javascript" src="../../../../static/ztree/jquery.ztree.all.min.js"></script>
	<script type="text/javascript" src="../../../../static/easyui/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../../../../static/kindeditor/kindeditor-all-min.js"></script>
    <title>修改员工信息</title>
    <style type="text/css">
.tl{
	width:100px;
	text-align: right;
	background-color: #ddd
}
.tc{
	width: 50px
}

input{
	width: 170px;
	height: 32px
}
td{
	height: 30px;
	font-size: 14px
}

</style>

</head>
  
<body>
	<div style="padding-left: 30px">
	<form id="form" method="post">
			<br><p style="color:#0a0;font-size: 16px;margin-left: 150px;margin-top: 10px">添加员工信息</p><br>
			<hr style="margin-right: 30px"><br>
		<table cellspacing="10" cellpadding="0" style="margin-left: 70px">
			<tr>
				<td class="tl">员工姓名:</td>
				<td><input type="text" name="name" value="${vo.name }" class="easyui-textbox theme-textbox-radius"  data-options="required:true"></td>
			</tr>
			<tr>
				<td class="tl">联系电话:</td>
				<td><input type="text" class="easyui-textbox theme-textbox-radius" value="${vo.telephone }" data-options="required:true" name="telephone"></td>
			</tr>
			<tr>
				<td class="tl">邮箱:</td>
				<td><input type="text" name="email" value=""  class="easyui-textbox theme-textbox-radius"></td>
			</tr>
			<tr>
				<td class="tl">地址:</td>
				<td><input name="address" value="" class="easyui-textbox theme-textbox-radius"></td>
			</tr>
			<tr>
			<td><input type="hidden" name="empid" value="${}"></td>
			</tr>
			<tr>
				<td colspan="2px" style="text-align: center">
					<a href="javascript:void(0);" id="saveBtn" class="easyui-linkbutton button-primary">保存</a>&nbsp; &nbsp;&nbsp;&nbsp;
					<a href="javascript:void(0);" id="resetBtn" class="easyui-linkbutton button-danger">重置</a>
				</td>
			</tr>
    </table>	
    </form>
    </div>
	<script type="text/javascript">
		$(function() {
			//重置按钮
			$("#resetBtn").on("click",function(event){
				$("#form").form("reset");
			});

			// /为保存按钮添加事件
			$("#saveBtn").on("click",function(event){
				$("#form").form("submit",{
					url:"AddEmployee",
					onSumbit : function(){
						//调用easyui中form对象的validate方法对表单中数据进行校验，该方法返回boolean值，如果为false会阻止表单提交
						return $("#form").form("validate");
					},
					success : function(data){
						var obj = eval("("+data+")");
						if(obj.success==true){
							$.messager.alert("提示",obj.msg);
							parent.closeTopWindow();
						}else{
							$.messager.alert("警告",obj.msg);
						}
					}
				});
			});

		});

	</script>
</body>
</html>
